<?php
include( 'init.php' );
$c = new WeiboClient ( WB_AKEY, WB_SKEY, $_SESSION ['last_key'] ['oauth_token'], $_SESSION ['last_key'] ['oauth_token_secret'] );
if( isset($_REQUEST['text']) || isset($_REQUEST['avatar']) )
{

if( isset($_REQUEST['pic']) )
	$rr = $c ->upload( $_REQUEST['text'] , $_REQUEST['pic'] );
elseif( isset($_REQUEST['avatar']  ) )
	$rr = $c->update_avatar( $_REQUEST['avatar'] );
else
	$rr = $c->update( $_REQUEST['text'] );	

	echo "<p>发送完成</p>" ; 

}
include './templates/listen.php';
